Using profiles

Profiles allow you to create from a single Kanzi Studio project a set of kzb files and Kanzi applications that differ only in certain parts.

Profile Inheritance

Profiles can inherit from several profiles. Each profile has an ordered list of parent profiles:

  1. Kanzi Studio first looks up the value for a property from the active profile.
  2. If Kanzi Studio cannot find the value, it goes through the parent profiles and picks the value from the first parent profile that defines the value. Therefore the first profiles on the parent list take precedence over those that came later.
  3. If Kanzi Studio cannot find the value in any of the parent profiles, it gets the value from the Root profile.

This enables a convenient way to reuse the settings in the profiles. For example, if you use two pairs of profiles: High-end and Low-end profiles, and Tegra and IMG binary shader profiles. Using the profile inheritance you can create a High-end Tegra profile by creating a new profile and making it inherit the High-end and Tegra profiles.

Creating different versions of your application from the same Kanzi Studio project

To create different versions of your application from the same Kanzi Studio project:

  1. Create your project using the default <Root Profile>.
  2. When you are done creating the project, in the Library right-click Profiles and select Create Profile.
  3. In the Properties set:
  4. In the Profile toolbar set Edit Profile property to the profile you just created.
    Now all the changes you make in your project are used only in the profile you seelected in the Edit Profile.
  5. Make the changes to your project to reflect the differences you need to make between different versions of your application. The values you set for these properties are used only in this profile.
  6. Kanzi Studio uses the following formatting conventions for property names:

  7. To see the differences between the <Root Profile> and your current profile, in the Project open the drop-down menu next to the search box and select .
  8. Select File > Export KZB Binary.
    Kanzi Studio creates .kzb binaries of your project for all the profiles you defined in the project.

Using different online shaders for different hardware platforms

To use different online shaders for different hardware platforms:

  1. Create a profile and activate it by selecting it in the Profile toolbar in the Edit Profile property. See Creating different versions of your application from the same Kanzi Studio project.
  2. In the Context Resources select the material type for which you want to use different online shaders.
    The materials show only the properties that the material type specifies for the active profile.
  3. Double-click either the vertex or the fragment shader.
    Kanzi Studio creates a new shader file for the active profile and opens the Shader Source Editor. See Editing shaders.
  4. Edit the shader to meet the requirements of your target hardware platform for the profile you selected.
    If the new shader requires different inputs, you can configure the property types of the material type for the active profile.

See also

Profiles

Editing shaders